﻿using Spider.Entitys.Spider;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SpiderCore
{
    public interface ISpider
    {
        /// <summary>
        /// 提取内容
        /// </summary>
        MessageContext Extract(ResponseModel response);

        /// <summary>
        /// 是否已存在
        /// </summary>
        bool Exist(string url);

        /// <summary>
        /// 设置页面抓取深度
        /// </summary>
        /// <param name="depth"></param>
        void SetSpiderDepth(int depth);

        /// <summary>
        /// 设置URL匹配规则
        /// </summary>
        /// <param name="CustomRuleList"></param>
        void SetCustomRuleList(List<CustomRuleModel> CustomRuleList);

    }
}
